The technical field is pay-per-use systems and methods that use central processor metering to determine processor utilization for billing and other purposes.
Many computer system users are turning to a pay-per-use concept in which the user is billed based on some measure of processor utilization within the computer system. A measure of processor utilization may be based on a metering scheme that determines when a processor is in use. Such metering of processor utilization is currently accomplished by software running within the computer system""s operating system. In a computer system having hardware that may be partitioned, gathering processor utilization data from a hardware system requires communications between the metering application and all operating systems running within the hardware. The need for communication with different operating systems poses significant challenges because operating systems by their design are separated from other operating systems and do not have visibility to utilization data from other operating systems. Furthermore, the way partitioned systems are deployed, network connectivity may not be possible between different operating systems on the same hardware, further complicating the ability to accurately measure processor utilization. Current solutions involve communicating with each operating system independently, and then aggregating the information at a later time. This solution may be troublesome when network access is restricted, agent software is not installed, and operating systems are temporarily out of service, for example. This solution also requires the development of operating system-specific agents because each partition is capable of running different instances of the operating systems. In particular, since operating systems within a partionable computer system do not, by default, communicate with each other, data providers (software agents) are needed to run on each operating system to collect and transmit, or otherwise provide utilization data from each partition. The thus-collected utilization data are aggregated to provide an overall value for processor utilization.
What is disclosed is a hardware based utilization metering device for use in a computer system having one or more central processor units (CPUs), the device comprising a state indicator coupled to a CPU, wherein the state indicator receives an indication when the CPU is in a first state; a counter coupled to the state indicator and coupled to a system clock, wherein the counter receives a measure of system time from the system clock and receives data related to the indication when the CPU is in the first state, and generates a counter value indicative of time the CPU is in the first state; and a data usage provider coupled to the counter, wherein the data usage provider is capable of providing the counter value.
Also disclosed is a hardware based method for measuring processor utilization in a computer system comprising a plurality of processors, the method comprising determining when any of the plurality of processors is busy (i.e., not idle); providing a busy indication to a counter associated with the busy processor; receiving at the counter a measure of computer system time; incrementing a counter value in the counter based on the received busy indication and an amount of computer system time that the processor is determined to be busy; and maintaining the counter value.
Finally, what is disclosed is an apparatus that provides hardware based utilization metering of CPUs in a computer system, comprising a plurality of CPUs. Associated with the CPUs is means for measuring computer system time. In addition, for each of the plurality of CPUs, the apparatus includes means for determining when the processor is busy; means for providing a busy indication when the processor is busy; means for receiving the busy indication and a measure of computer system time; means for combining the busy indication and the measure of computer system time to generate a counter value indicative of processor utilization; and means for maintaining the counter value.